import QtQuick 2.0
import QtQuick.Controls 1.4
import QtQuick.Layouts 1.14

Item {
   id:root
   signal smallWin()
   signal quitWin()

   RowLayout{
      spacing: 10
      Rectangle{
         width: 30
         height: 30
         radius: 10
         color: "#1989FA"

         Label{
             text: "—"
             font.pixelSize: 20
             font.bold: true
             color: "white"
             anchors.centerIn: parent
         }

         MouseArea{
            anchors.fill: parent
            onPressed: {
                 parent.scale *= .9
            }
            onReleased: {
                parent.scale /= .9
                root.smallWin()
            }
         }
      }

      Rectangle{
         width: 30
         height: 30
         radius: 10
         color: "#FF0000"

         Label{
             text: "X"
             font.pixelSize: 20
             font.bold: true
             color: "white"
             anchors.centerIn: parent
         }

         MouseArea{
            anchors.fill: parent
            onPressed: {
                 parent.scale *= .9
            }
            onReleased: {
                parent.scale /= .9
                root.quitWin()
            }
         }
      }
   }
}
